package cn.luckdou.system.model.black_list;

import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 黑名单
 * </p>
 *
 * @author Dadou
 * @since 2017-11-14
 */
@TableName("tb_black_list")
public class BlackList extends Model<BlackList> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 类型 0短信手机号 1短信Ip 2ccIp
     */
	private Integer type;
    /**
     * 状态 0正常 1临时解封
     */
	private Integer hstatus;
    /**
     * 值
     */
	private String value;
    /**
     * 封禁时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date time;
    /**
     * 备注 （可当第二个value使用）
     */
	private String remark;
    /**
     * 状态 1正常 0停用
     */
	private Integer status;
    /**
     * 创建时间
     */
	@TableField("created_time")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createdTime;
    /**
     * 修改时间
     */
	@TableField("updated_time")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date updatedTime;
    /**
     * 删除时间
     */
	@TableField("deleted_time")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date deletedTime;
    /**
     * 编辑人
     */
	@TableField("created_editor")
	private String createdEditor;
    /**
     * 更新人
     */
	@TableField("updated_editor")
	private String updatedEditor;
	/**
	 * 无参构造方法
	 */
	public BlackList(){
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getHstatus() {
		return hstatus;
	}

	public void setHstatus(Integer hstatus) {
		this.hstatus = hstatus;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value =StringUtils.isNotBlank(value)?value:null;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark =StringUtils.isNotBlank(remark)?remark:null;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	public Date getUpdatedTime() {
		return updatedTime;
	}

	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}

	public Date getDeletedTime() {
		return deletedTime;
	}

	public void setDeletedTime(Date deletedTime) {
		this.deletedTime = deletedTime;
	}

	public String getCreatedEditor() {
		return createdEditor;
	}

	public void setCreatedEditor(String createdEditor) {
		this.createdEditor =StringUtils.isNotBlank(createdEditor)?createdEditor:null;
	}

	public String getUpdatedEditor() {
		return updatedEditor;
	}

	public void setUpdatedEditor(String updatedEditor) {
		this.updatedEditor =StringUtils.isNotBlank(updatedEditor)?updatedEditor:null;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
